<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="/views/commons/taglibs.jsp" %>
<script src="<%=path %>/js/common.js"></script>
<div class="panel-heading">
	<h3 class="panel-title">我的回答</h3>
</div>
<div class="bd clearfix">
	<form id="my_answer_choose_form" action="javascript:void(0);">
		<div class="filter-wrap">
			<dl class="clearfix invest-filter">
				<dt>问题关键字</dt>
				<dd class="clearfix">
					<div class="col-sm-4 mb20">
						<div class="input-group">
							<input type="text" name="questionDetail" value="${paramMap.questionDetail}" class="form-control" placeholder="请输入问题关键字">
							<span class="input-group-btn">
								<button class="btn btn-primary" type="button" onclick="javascript:queryMyAnswerList(1);">搜索</button>
							</span>
						</div>
					</div>
				</dd>
			</dl>
			<d:radio describe="问题状态" tableColumn="question_status_2" fieldName="questionStatus" 
				value="${paramMap.questionStatus}" type="query_single" queryFunction="queryMyAnswerList"></d:radio>
		</div>
	</form>
</div>
<c:choose>
<c:when test="${!empty dataList && fn:length(dataList) ne 0}">
<table class="table">
	<thead>
		<tr>
			<th width="70%">问题</th>
			<th width="10%">提问人</th>
			<th width="10%">状态</th>
			<th width="10%">操作</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="questionVO" items="${dataList}" varStatus="index">
		<tr>
			<td class="title">
				<a href="<%=path %>/account/question/view/${questionVO.questionId}" target="_blank">${questionVO.questionDetail}</a>
			</td>
			<td >
				${questionVO.publishUserName}
			</td>
			<td>
				<c:choose>
					<c:when test="${questionVO.questionStatus==1}">	
					待付款
					</c:when>
					
					<c:when test="${questionVO.questionStatus==2}">	
					待回答
					</c:when>
					
					<c:when test="${questionVO.questionStatus==3}">	
					已回答
					</c:when>
					
					<c:when test="${questionVO.questionStatus==11}">	
					审核不通过
					</c:when>
					
					<c:when test="${questionVO.questionStatus==12}">	
					到期未回答
					</c:when>
				</c:choose>	
			</td>
			<td>
				<c:if test="${questionVO.questionStatus==2}">
				<a href="<%=path %>/check/question/toAnswer/${questionVO.questionId}" target="_blank">回答</a>
				</c:if>
			</td>
		</tr>
		</c:forEach>
	</tbody>
</table>
<!-- 分页 -->
<p:pagination pageNo="${paramMap.pageNo}" pageCount="${paramMap.pageCount}" queryFunction="queryAdminQuestionList" style="text-center"></p:pagination>
<!-- 分页 end -->
</c:when>
<c:otherwise>
	<table class="table">
		<thead>
			<tr>
				<th width="70%">问题</th>
				<th width="10%">提问人</th>
				<th width="10%">状态</th>
				<th width="10%">操作</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td colspan="5" align="center">
					暂无数据
				</td>
			</tr>
		</tbody>
	</table>
</c:otherwise>
</c:choose>